﻿@model Gagnatek.WebSite.Models.Users
@{
    ViewBag.Title = "CustomerIndex";
}
<h2>
    Bienvenue, @User.Identity.Name</h2>
<h3>
    Réservations en cours</h3>
<ul>
    @foreach (var l in Model.Loans)
    {
        if (l.reserved == 1)
        {
        <li>@Html.ActionLink(@l.Medias.name, "Details", "Medias", new { id = @l.Medias.id }, null),
            réservé le @l.pickedAt.Value.ToString("dddd d MMMM")</li>
        }
    }
</ul>
<h3>
    Emprunts en cours</h3>
<ul>
    @foreach (var l in Model.Loans)
    {
        if (l.reserved == 0)
        {
        <li>@Html.ActionLink(@l.Medias.name, "Details", "Medias", new { id = @l.Medias.id }, null),
            emprunté le @l.pickedAt.Value.ToString("dddd d MMMM")</li>
        }
    }
</ul>
